package com.wql.service.impl;

import com.wql.service.BookShopService;
import com.wql.service.WqlHaHa;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author wql
 * @version 1.0
 * @date 2022/11/14 20:30
 */

public class WqlHaHaImpl implements WqlHaHa {
    @Autowired
   private BookShopService bookShopService;
    @Transactional
    public void buy(List<String> isbns, String username) {
        for (String isbn : isbns){
            bookShopService.purchase(isbn,username);
        }
    }
}
